home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kio / global.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-10  |  18.8 KB  |  545 lines

  1. /* This file is part of the KDE libraries
  2.    Copyright (C) 2000 David Faure <faure@kde.org>
  3.  
  4.    This library is free software; you can redistribute it and/or
  5.    modify it under the terms of the GNU Library General Public
  6.    License version 2 as published by the Free Software Foundation.
  7.  
  8.    This library is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  11.    Library General Public License for more details.
  12.  
  13.    You should have received a copy of the GNU Library General Public License
  14.    along with this library; see the file COPYING.LIB.  If not, write to
  15.    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  16.    Boston, MA 02110-1301, USA.
  17. */
  18. #ifndef __kio_global_h__
  19. #define __kio_global_h__
  20.  
  21. #include <qstring.h>
  22. #include <qvaluelist.h>
  23. #include <qptrlist.h>
  24. #include <qdatastream.h>
  25. #include <qdatetime.h>
  26. #include <qmap.h>
  27.  
  28. #include <kurl.h>
  29.  
  30. /**
  31.  * @short A namespace for KIO globals
  32.  *
  33.  */
  34. namespace KIO
  35. {
  36.   /// 64-bit file offset
  37.   typedef Q_LLONG fileoffset_t;
  38.   /// 64-bit file size
  39.   typedef Q_ULLONG filesize_t;
  40.  
  41.   /**
  42.    * Converts @p size from bytes to the string representation.
  43.    *
  44.    * @param  size  size in bytes
  45.    * @return converted size as a string - e.g. 123.4 kB , 12.0 MB
  46.    */
  47.   KIO_EXPORT QString convertSize( KIO::filesize_t size );
  48.  
  49.   /**
  50.    * Converts @p size from bytes to a string representation with includes
  51.    * the size in bytes.
  52.    * e.g. 90 B, 240 B, 1.4 KB (1495 B), 2.6MB (2,734,344 B), 0 B
  53.    * @param  size  size in bytes
  54.    * @return converted size as a string - e.g. 1.4 KB (1495 B), 45 B
  55.    */
  56.   KIO_EXPORT QString convertSizeWithBytes( KIO::filesize_t size );
  57.   /**
  58.    * Converts a size to a string representation
  59.    * Not unlike QString::number(...)
  60.    *
  61.    * @param size size in bytes
  62.    * @return  converted size as a string - e.g. 123456789
  63.    */
  64.   KIO_EXPORT QString number( KIO::filesize_t size );
  65.  
  66.   /**
  67.    * Converts size from kilo-bytes to the string representation.
  68.    *
  69.    * @param  kbSize  size in kilo-bytes
  70.    * @return converted size as a string - e.g. 123.4 kB , 12.0 MB
  71.    */
  72.    KIO_EXPORT QString convertSizeFromKB( KIO::filesize_t kbSize );
  73.  
  74.   /**
  75.    * Calculates remaining time in seconds from total size, processed size and speed.
  76.    *
  77.    * @param  totalSize      total size in bytes
  78.    * @param  processedSize  processed size in bytes
  79.    * @param  speed          speed in bytes per second
  80.    * @return calculated remaining time in seconds
  81.    *
  82.    * @since 3.4
  83.    */
  84.   KIO_EXPORT unsigned int calculateRemainingSeconds( KIO::filesize_t totalSize,
  85.                                                      KIO::filesize_t processedSize, KIO::filesize_t speed );
  86.  
  87.   /**
  88.    * Convert @p seconds to a string representing number of days, hours, minutes and seconds
  89.    *
  90.    * @param  seconds number of seconds to convert
  91.    * @return string representation in a locale depending format
  92.    *
  93.    * @since 3.4
  94.    */
  95.   KIO_EXPORT QString convertSeconds( unsigned int seconds );
  96.  
  97.   /**
  98.    * Calculates remaining time from total size, processed size and speed.
  99.    * Warning: As QTime is limited to 23:59:59, use calculateRemainingSeconds() instead
  100.    *
  101.    * @param  totalSize      total size in bytes
  102.    * @param  processedSize  processed size in bytes
  103.    * @param  speed          speed in bytes per second
  104.    * @return calculated remaining time
  105.    */
  106.   KIO_EXPORT QTime calculateRemaining( KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed ) KDE_DEPRECATED;
  107.  
  108.   /**
  109.    * Helper for showing information about a set of files and directories
  110.    * @param items the number of items (= @p files + @p dirs + number of symlinks :)
  111.    * @param files the number of files
  112.    * @param dirs the number of dirs
  113.    * @param size the sum of the size of the @p files
  114.    * @param showSize whether to show the size in the result
  115.    * @return the summary string
  116.    */
  117.   KIO_EXPORT QString itemsSummaryString(uint items, uint files, uint dirs, KIO::filesize_t size, bool showSize);
  118.  
  119.   /**
  120.    * Encodes (from the text displayed to the real filename)
  121.    * This translates % into %% and / into %2f
  122.    * Used by KIO::link, for instance.
  123.    * @param str the file name to encode
  124.    * @return the encoded file name
  125.    */
  126.   KIO_EXPORT QString encodeFileName( const QString & str );
  127.   /**
  128.    * Decodes (from the filename to the text displayed)
  129.    * This translates %2[fF] into / and %% into %
  130.    * @param str the file name to decode
  131.    * @return the decoded file name
  132.    */
  133.   KIO_EXPORT QString decodeFileName( const QString & str );
  134.  
  135.   /**
  136.    * Commands that can be invoked by a job.
  137.    */
  138.   enum Command {
  139.     CMD_HOST = '0', // 48
  140.     CMD_CONNECT = '1', // 49
  141.     CMD_DISCONNECT = '2', // 50
  142.     CMD_SLAVE_STATUS = '3', // 51
  143.     CMD_SLAVE_CONNECT = '4', // 52
  144.     CMD_SLAVE_HOLD = '5', // 53
  145.     CMD_NONE = 'A', // 65
  146.     CMD_TESTDIR = 'B', // 66
  147.     CMD_GET = 'C', // 67
  148.     CMD_PUT = 'D', // 68
  149.     CMD_STAT = 'E', // 69
  150.     CMD_MIMETYPE = 'F', // 70
  151.     CMD_LISTDIR = 'G', // 71
  152.     CMD_MKDIR = 'H', // 72
  153.     CMD_RENAME = 'I', // 73
  154.     CMD_COPY = 'J', // 74
  155.     CMD_DEL = 'K', // 75
  156.     CMD_CHMOD = 'L', // 76
  157.     CMD_SPECIAL = 'M', // 77
  158.     CMD_USERPASS = 'N', // 78
  159.     CMD_REPARSECONFIGURATION = 'O', // 79
  160.     CMD_META_DATA = 'P', // 80
  161.     CMD_SYMLINK = 'Q', // 81
  162.     CMD_SUBURL = 'R', // 82  Inform the slave about the url it is streaming on.
  163.     CMD_MESSAGEBOXANSWER = 'S', // 83
  164.     CMD_RESUMEANSWER = 'T', // 84
  165.     CMD_CONFIG = 'U', // 85
  166.     CMD_MULTI_GET = 'V' // 86
  167.     // Add new ones here once a release is done, to avoid breaking binary compatibility.
  168.     // Note that protocol-specific commands shouldn't be added here, but should use special.
  169.   };
  170.  
  171.   /**
  172.    * Error codes that can be emitted by KIO.
  173.    */
  174.   enum Error {
  175.     ERR_CANNOT_OPEN_FOR_READING = 1,
  176.     ERR_CANNOT_OPEN_FOR_WRITING = 2,
  177.     ERR_CANNOT_LAUNCH_PROCESS = 3,
  178.     ERR_INTERNAL = 4,
  179.     ERR_MALFORMED_URL = 5,
  180.     ERR_UNSUPPORTED_PROTOCOL = 6,
  181.     ERR_NO_SOURCE_PROTOCOL = 7,
  182.     ERR_UNSUPPORTED_ACTION = 8,
  183.     ERR_IS_DIRECTORY = 9, // ... where a file was expected
  184.     ERR_IS_FILE = 10, // ... where a directory was expected (e.g. listing)
  185.     ERR_DOES_NOT_EXIST = 11,
  186.     ERR_FILE_ALREADY_EXIST = 12,
  187.     ERR_DIR_ALREADY_EXIST = 13,
  188.     ERR_UNKNOWN_HOST = 14,
  189.     ERR_ACCESS_DENIED = 15,
  190.     ERR_WRITE_ACCESS_DENIED = 16,
  191.     ERR_CANNOT_ENTER_DIRECTORY = 17,
  192.     ERR_PROTOCOL_IS_NOT_A_FILESYSTEM = 18,
  193.     ERR_CYCLIC_LINK = 19,
  194.     ERR_USER_CANCELED = 20,
  195.     ERR_CYCLIC_COPY = 21,
  196.     ERR_COULD_NOT_CREATE_SOCKET = 22, // KDE4: s/COULD_NOT/CANNOT/ or the other way round
  197.     ERR_COULD_NOT_CONNECT = 23,
  198.     ERR_CONNECTION_BROKEN = 24,
  199.     ERR_NOT_FILTER_PROTOCOL = 25,
  200.     ERR_COULD_NOT_MOUNT = 26,
  201.     ERR_COULD_NOT_UNMOUNT = 27,
  202.     ERR_COULD_NOT_READ = 28,
  203.     ERR_COULD_NOT_WRITE = 29,
  204.     ERR_COULD_NOT_BIND = 30,
  205.     ERR_COULD_NOT_LISTEN = 31,
  206.     ERR_COULD_NOT_ACCEPT = 32,
  207.     ERR_COULD_NOT_LOGIN = 33,
  208.     ERR_COULD_NOT_STAT = 34,
  209.     ERR_COULD_NOT_CLOSEDIR = 35,
  210.     ERR_COULD_NOT_MKDIR = 37,
  211.     ERR_COULD_NOT_RMDIR = 38,
  212.     ERR_CANNOT_RESUME = 39,
  213.     ERR_CANNOT_RENAME = 40,
  214.     ERR_CANNOT_CHMOD = 41,
  215.     ERR_CANNOT_DELETE = 42,
  216.     // The text argument is the protocol that the dead slave supported.
  217.     // This means for example: file, ftp, http, ...
  218.     ERR_SLAVE_DIED = 43,
  219.     ERR_OUT_OF_MEMORY = 44,
  220.     ERR_UNKNOWN_PROXY_HOST = 45,
  221.     ERR_COULD_NOT_AUTHENTICATE = 46,
  222.     ERR_ABORTED = 47, // Action got aborted from application side
  223.     ERR_INTERNAL_SERVER = 48,
  224.     ERR_SERVER_TIMEOUT = 49,
  225.     ERR_SERVICE_NOT_AVAILABLE = 50,
  226.     ERR_UNKNOWN = 51,
  227.     // (was a warning) ERR_CHECKSUM_MISMATCH = 52,
  228.     ERR_UNKNOWN_INTERRUPT = 53,
  229.     ERR_CANNOT_DELETE_ORIGINAL = 54,
  230.     ERR_CANNOT_DELETE_PARTIAL = 55,
  231.     ERR_CANNOT_RENAME_ORIGINAL = 56,
  232.     ERR_CANNOT_RENAME_PARTIAL = 57,
  233.     ERR_NEED_PASSWD = 58,
  234.     ERR_CANNOT_SYMLINK = 59,
  235.     ERR_NO_CONTENT = 60, // Action succeeded but no content will follow.
  236.     ERR_DISK_FULL = 61,
  237.     ERR_IDENTICAL_FILES = 62, // src==dest when moving/copying
  238.     ERR_SLAVE_DEFINED = 63, // for slave specified errors that can be
  239.                             // rich text.  Email links will be handled
  240.                             // by the standard email app and all hrefs
  241.                             // will be handled by the standard browser.
  242.                             // <a href="exec:/khelpcenter ?" will be
  243.                             // forked.
  244.     ERR_UPGRADE_REQUIRED = 64, // A transport upgrade is required to access this
  245.                                // object.  For instance, TLS is demanded by
  246.                                // the server in order to continue.
  247.     ERR_POST_DENIED = 65    // Issued when trying to POST data to a certain Ports
  248.                                // see job.cpp
  249.   };
  250.  
  251.   /**
  252.    * Returns a translated error message for @p errorCode using the
  253.    * additional error information provided by @p errorText.
  254.    * @param errorCode the error code
  255.    * @param errorText the additional error text
  256.    * @return the created error string
  257.    */
  258.   KIO_EXPORT QString buildErrorString(int errorCode, const QString &errorText);
  259.  
  260.   /**
  261.    * Returns a translated html error message for @p errorCode using the
  262.    * additional error information provided by @p errorText , @p reqUrl
  263.    * (the request URL), and the ioslave @p method .
  264.    * @param errorCode the error code
  265.    * @param errorText the additional error text
  266.    * @param reqUrl the request URL
  267.    * @param method the ioslave method
  268.    * @return the created error string
  269.    */
  270.   KIO_EXPORT QString buildHTMLErrorString(int errorCode, const QString &errorText,
  271.                                 const KURL *reqUrl = 0L, int method = -1 );
  272.  
  273.   /**
  274.    * Returns translated error details for @p errorCode using the
  275.    * additional error information provided by @p errorText , @p reqUrl
  276.    * (the request URL), and the ioslave @p method .
  277.    *
  278.    * @param errorCode the error code
  279.    * @param errorText the additional error text
  280.    * @param reqUrl the request URL
  281.    * @param method the ioslave method
  282.    * @return the following data:
  283.    * @li QString errorName - the name of the error
  284.    * @li QString techName - if not null, the more technical name of the error
  285.    * @li QString description - a description of the error
  286.    * @li QStringList causes - a list of possible causes of the error
  287.    * @li QStringList solutions - a liso of solutions for the error
  288.    */
  289.   KIO_EXPORT QByteArray rawErrorDetail(int errorCode, const QString &errorText,
  290.                                 const KURL *reqUrl = 0L, int method = -1 );
  291.  
  292.   /**
  293.    * Returns an appropriate error message if the given command @p cmd
  294.    * is an unsupported action (ERR_UNSUPPORTED_ACTION).
  295.    * @param protocol name of the protocol
  296.    * @param cmd given command
  297.    * @see enum Command
  298.    * @since 3.2
  299.    */
  300.   KIO_EXPORT QString unsupportedActionErrorString(const QString &protocol, int cmd);
  301.  
  302.   /**
  303.    * Constants used to specify the type of a KUDSAtom.
  304.    */
  305.   enum UDSAtomTypes {
  306.     /// First let's define the item types
  307.     UDS_STRING = 1,
  308.     UDS_LONG = 2,
  309.     UDS_TIME = 4 | UDS_LONG,
  310.  
  311.     // To add new UDS entries below, you can use a step of 8
  312.     // (i.e. 8, 16, 24, 32, etc.) Only the last 3 bits are a bitfield,
  313.     // the rest isn't.
  314.  
  315.     /// Size of the file
  316.     UDS_SIZE = 8 | UDS_LONG,
  317.     UDS_SIZE_LARGE = 32768 | UDS_LONG, // For internal use only
  318.     /// User ID of the file owner
  319.     UDS_USER = 16 | UDS_STRING,
  320.     /// Name of the icon, that should be used for displaying.
  321.     /// It overrides all other detection mechanisms
  322.     /// @since 3.2
  323.     UDS_ICON_NAME = 24 | UDS_STRING,
  324.     /// Group ID of the file owner
  325.     UDS_GROUP =    32 | UDS_STRING,
  326.     /// Extra data (used only if you specified Columns/ColumnsTypes)
  327.     /// This is the only UDS entry that can be repeated.
  328.     /// @since 3.2
  329.     UDS_EXTRA = 48 | UDS_STRING,
  330.     /// Filename - as displayed in directory listings etc.
  331.     /// "." has the usual special meaning of "current directory"
  332.     UDS_NAME = 64 | UDS_STRING,
  333.     /// A local file path if the ioslave display files sitting
  334.     /// on the local filesystem (but in another hierarchy, e.g. media:/)
  335.     UDS_LOCAL_PATH = 72 | UDS_STRING,
  336.     /// Treat the file as a hidden file or as a normal file,
  337.     /// regardless of (the absence of) a leading dot in the filename.
  338.     UDS_HIDDEN = 80 | UDS_LONG,
  339.     /// Indicates that the entry has extended ACL entries
  340.     /// @since 3.5
  341.     UDS_EXTENDED_ACL = 88 | UDS_LONG,
  342.     /// The access control list serialized into a single string.
  343.     /// @since 3.5
  344.     UDS_ACL_STRING = 96 | UDS_STRING,
  345.     /// The default access control list serialized into a single string.
  346.     /// Only available for directories.
  347.     /// @since 3.5
  348.     UDS_DEFAULT_ACL_STRING = 104 | UDS_STRING,
  349.  
  350.     // available: 112, 120 
  351.  
  352.     /// Access permissions (part of the mode returned by stat)
  353.     UDS_ACCESS = 128 | UDS_LONG,
  354.     /// The last time the file was modified
  355.     UDS_MODIFICATION_TIME = 256 | UDS_TIME,
  356.     /// The last time the file was opened
  357.     UDS_ACCESS_TIME = 512 | UDS_TIME,
  358.     /// The time the file was created
  359.     UDS_CREATION_TIME = 1024 | UDS_TIME,
  360.     /// File type, part of the mode returned by stat
  361.     /// (for a link, this returns the file type of the pointed item)
  362.     /// check UDS_LINK_DEST to know if this is a link
  363.     UDS_FILE_TYPE = 2048 | UDS_LONG,
  364.     /// Name of the file where the link points to
  365.     /// Allows to check for a symlink (don't use S_ISLNK !)
  366.     UDS_LINK_DEST = 4096 | UDS_STRING,
  367.     /// An alternative URL (If different from the caption)
  368.     UDS_URL = 8192 | UDS_STRING,
  369.     /// A mime type; prevents guessing
  370.     UDS_MIME_TYPE = 16384 | UDS_STRING,
  371.     /// A mime type to be used for displaying only.
  372.     /// But when 'running' the file, the mimetype is re-determined
  373.     UDS_GUESSED_MIME_TYPE = 16392 | UDS_STRING,
  374.     /// XML properties, e.g. for WebDAV
  375.     /// @since 3.1
  376.     UDS_XML_PROPERTIES = 0x8000 | UDS_STRING
  377.   };
  378.  
  379.   /**
  380.    * Specifies how to use the cache.
  381.    * @see parseCacheControl()
  382.    * @see getCacheControlString()
  383.    */
  384.   enum CacheControl
  385.   {
  386.       CC_CacheOnly, ///< Fail request if not in cache
  387.       CC_Cache,     ///< Use cached entry if available
  388.       CC_Verify,    ///< Validate cached entry with remote site if expired
  389.       CC_Refresh,   ///< Always validate cached entry with remote site
  390.                     ///< @since 3.1
  391.       CC_Reload     ///< Always fetch from remote site.
  392.   };
  393.  
  394.   /**
  395.    * Parses the string representation of the cache control option.
  396.    *
  397.    * @param cacheControl the string representation
  398.    * @return the cache control value
  399.    * @see getCacheControlString()
  400.    */
  401.   KIO_EXPORT KIO::CacheControl parseCacheControl(const QString &cacheControl);
  402.  
  403.   /**
  404.    * Returns a string representation of the given cache control method.
  405.    *
  406.    * @param cacheControl the cache control method
  407.    * @return the string representation
  408.    * @see parseCacheControl()
  409.    */
  410.   KIO_EXPORT QString getCacheControlString(KIO::CacheControl cacheControl);
  411.  
  412.   /**
  413.    * Returns the mount point where @p device is mounted
  414.    * right now. This means, it has to be mounted, not just
  415.    * defined in fstab.
  416.    */
  417.   KIO_EXPORT QString findDeviceMountPoint( const QString& device );
  418.  
  419.   /**
  420.    * Returns the mount point on which resides @p filename.
  421.    * For instance if /home is a separate partition, findPathMountPoint("/home/user/blah")
  422.    * will return /home
  423.    * @param filename the file name to check
  424.    * @return the mount point of the given @p filename
  425.    */
  426.   KIO_EXPORT QString findPathMountPoint( const QString & filename );
  427.  
  428.   /**
  429.    * Checks if the path belongs to a filesystem that is probably
  430.    * slow. It checks for NFS or for paths belonging to automounted
  431.    * paths not yet mounted
  432.    * @param filename the file name to check
  433.    * @return true if the filesystem is probably slow
  434.    */
  435.   KIO_EXPORT bool probably_slow_mounted(const QString& filename);
  436.  
  437.   /**
  438.    * Checks if the path belongs to a filesystem that is manually
  439.    * mounted.
  440.    * @param filename the file name to check
  441.    * @return true if the filesystem is manually mounted
  442.    */
  443.   KIO_EXPORT bool manually_mounted(const QString& filename);
  444.  
  445.   enum FileSystemFlag { SupportsChmod, SupportsChown, SupportsUTime,
  446.                         SupportsSymlinks, CaseInsensitive };
  447.   /**
  448.    * Checks the capabilities of the filesystem to which a given file belongs.
  449.    * given feature (e.g. chmod).
  450.    * @param filename the file name to check
  451.    * @param flag the flag to check
  452.    * @return true if the filesystem has that flag, false if not (or some error occurred)
  453.    *
  454.    * The availables flags are:
  455.    * @li SupportsChmod: returns true if the filesystem supports chmod
  456.    * (e.g. msdos filesystems return false)
  457.    * @li SupportsChown: returns true if the filesystem supports chown
  458.    * (e.g. msdos filesystems return false)
  459.    * @li SupportsUtime: returns true if the filesystems supports utime
  460.    * (e.g. msdos filesystems return false)
  461.    * @li SupportsSymlinks: returns true if the filesystems supports symlinks
  462.    * (e.g. msdos filesystems return false)
  463.    * @li CaseInsensitive: returns true if the filesystem treats
  464.    * "foo" and "FOO" as being the same file (true for msdos systems)
  465.    *
  466.    */
  467.   KIO_EXPORT bool testFileSystemFlag(const QString& filename, FileSystemFlag flag);
  468.  
  469.  
  470. /************
  471.  *
  472.  * Universal Directory Service
  473.  *
  474.  * Any file or URL can be represented by the UDSEntry type below
  475.  * A UDSEntry is a list of atoms
  476.  * Each atom contains a specific bit of information for the file
  477.  *
  478.  * The following UDS constants represent the different possible values
  479.  * for m_uds in the UDS atom structure below
  480.  *
  481.  * Each atom contains a specific bit of information for the file
  482.  */
  483. class KIO_EXPORT UDSAtom
  484. {
  485. public:
  486.   /**
  487.    * Whether 'm_str' or 'm_long' is used depends on the value of 'm_uds'.
  488.    */
  489.   QString m_str;
  490.   /**
  491.    * Whether 'm_str' or 'm_long' is used depends on the value of 'm_uds'.
  492.    */
  493.   long long m_long;
  494.  
  495.   /**
  496.    * Holds one of the UDS_XXX constants
  497.    */
  498.   unsigned int m_uds;
  499. };
  500.  
  501. /**
  502.  * An entry is the list of atoms containing all the informations for a file or URL
  503.  */
  504. typedef QValueList<UDSAtom> UDSEntry;
  505. typedef QValueList<UDSEntry> UDSEntryList;
  506. typedef QValueListIterator<UDSEntry> UDSEntryListIterator;
  507. typedef QValueListConstIterator<UDSEntry> UDSEntryListConstIterator;
  508.  
  509. /**
  510.  * MetaData is a simple map of key/value strings.
  511.  */
  512. class KIO_EXPORT MetaData : public QMap<QString, QString>
  513. {
  514. public:
  515.   /**
  516.    * Creates an empty meta data map.
  517.    */
  518.    MetaData() : QMap<QString, QString>() { };
  519.   /**
  520.    * Copy constructor.
  521.    */
  522.    MetaData(const QMap<QString, QString>&metaData) :
  523.      QMap<QString, QString>(metaData) { };
  524.  
  525.    /**
  526.     * Adds the given meta data map to this map.
  527.     * @param metaData the map to add
  528.     * @return this map
  529.     */
  530.    MetaData & operator+= ( const QMap<QString,QString> &metaData )
  531.    {
  532.       QMap<QString,QString>::ConstIterator it;
  533.       for( it = metaData.begin();
  534.            it !=  metaData.end();
  535.            ++it)
  536.       {
  537.          replace(it.key(), it.data());
  538.       }
  539.       return *this;
  540.    }
  541. };
  542.  
  543. }
  544. #endif
  545.